package practice;

import java.util.Scanner;

public class _01UpStairs {
    public static void main(String[] args) {
        //  该方案超时，但我也不知道为什么
        Scanner scanner = new Scanner(System.in);
        int seconds = scanner.nextInt();
        int minutes = seconds / 60;
        if (minutes == 0){
            System.out.println(0);
        }else if (minutes <= 3) {
            System.out.println(1);
        }
        int[] dp = new int[minutes+1];
        dp[1] = 1;
        dp[2] = 1;
        dp[3] = 1;
        for (int i = 4;i < dp.length;i++){
            //  注意！！！
            dp[i] = (dp[i-1] + dp[i-2] + dp[i-3]) % 425;
        }
        System.out.println(dp[minutes] % 425);
    }
}
